Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

De-allocate Kd_bkgnd and Kv_bkgnd #188

Merged
merged 1 commit into from
May 23, 2021

Conversation

gustavo-marques
Copy link
Collaborator

@gustavo-marques gustavo-marques commented May 22, 2021

When Kd_bkgnd or Kv_bkgnd are included in the diag_table, a corresponding 3D array gets allocated every tracer time step so the requested diagnostic can be posted. However, this array was never deallocated which caused a memory leak. This patch fixes this issue by making sure both Kd_bkgnd or Kv_bkgnd are deallocated.

Many thanks to @klindsay28 for helping to find this memory leak.

This PR should not change answers.

These arrays were not being deallocated which was causing a
memory leak problem.
@alperaltuntas alperaltuntas merged commit d1de7c8 into NCAR:dev/ncar May 23, 2021
@marshallward
Copy link

marshallward commented May 25, 2021

Just to let you know that I am working through our memory allocations as well, see this branch:

https://github.com/marshallward/mom6/tree/valgrind_fixes

You can push changes over there as well if you want to keep in sync.

alperaltuntas pushed a commit that referenced this pull request Dec 14, 2022
* Change dumbbell initialization
* Change in Dumbbell Layer Mode
* Fix sponge diagnostics
* Fix ALE Sponge Diagnostics
* A minor style change removing spaces around = in optional. function arguments.
* Fix ALE sponge diagnostics
* character declaration fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants